<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmpInfoTable extends Migration
{

    public function up()
    {
        Schema::create('cmpInfo', function(Blueprint $table) {
            $table->increments('id');
            $table->string('userId')->comment('用户id');
            $table->string('cmpName')->comment('公司名称');
            $table->string('cmpWelcome')->comment('欢迎语');
            $table->string('cmpLogo')->comment('公司logo');
            $table->string('cmpBgImg')->comment('公司背景图片');
            $table->tinyInteger('isMessageOn')->default(1)->comment('短信开通提醒 0:否 1:是');
            $table->tinyInteger('isMailOn')->default(0)->comment('邮件开通提醒 0:否 1:是');
            $table->tinyInteger('status')->default(0)->comment('引导填写状态，0：默认值，1：第一步，2：第二部，3：第三部');
            $table->integer('createdAt')->comment('创建时间');
            $table->integer('updatedAt')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `cmpInfo` comment '公司信息表'");
    }

    public function down()
    {
        Schema::drop('cmpInfo');
    }
}
